<template>
  <div class="w-page">
    <div class="w-header">
      <div class="w-head">{{info.projectTitle}}</div>
    </div>
    <div class="w-head2 flex hb vd">
      <div class="head2left">
        <p class="w-target">
          <span>目标捐赠额</span>
          <span>{{info.objective}}元</span>
        </p>
        <p class="w-textsm">
          <span>累计捐赠金额</span>
          <span>{{info.donate}}元</span>
        </p>
        <p class="w-textsm">
          <span>累计捐赠人次</span>
          <span>{{info.peoples}}次</span>
        </p>
      </div>
      <div>
        <router-link :to="{path:'/donPay', query:{projectId: info.id}}" class="w-todonate">我要捐赠</router-link>
      </div>
    </div>
      <img :src="info.frontCover" alt="">
    <div class="ck-content" v-html="info.detail"></div>
  </div>
</template>

<script>
import { projectDetail } from '@/api/project'
import '../styles/content-styles.css'
export default {
  data () {
    return {
      info: {
        title: '山西师范大学教育发展基金会简介',
        source: '管理员',
        date: '2020.02.10 16:30'
      }
    }
  },
  created () {
    projectDetail({ id: this.$route.query.id }).then(response => {
      this.info = response.data
    })
  }
}
</script>

<style scoped>
  .w-page {
    width: 100vw;
    padding: 0 20px;
  }

  .w-header {
    padding-top: 17px;
    padding-bottom: 7px;
    border-bottom: 1px solid #E5E5E5;
    /* margin-bottom: 15px; */
  }

  .w-head {
    font-size: 19px;
    color: rgba(49, 49, 49, 1);
  }

  .w-page img {
    width: 100%;
    display: block;
  }

  .w-con p {
    text-indent: 20px;
    font-size: 16px;
    color: rgba(83, 83, 83, 1);
    padding: 20px 0;
    line-height: 1.8;
    text-align: justify;
  }

  .w-head2 {
    padding-top: 17px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E5E5E5;
    margin-bottom: 10px;
    -moz-box-align: flex-end;
    -webkit-box-align: flex-end;
    -ms-flex-align: flex-end;
    -webkit-align-items: flex-end;
    align-items: flex-end;
  }

  .w-todonate {
    background: #8E3C3F;
    color: #fff;
    border-radius: 3px;
    font-size: 17px;
    padding: 12px 15px;
    display: inline-block;
    line-height: 1;
  }

  .w-target {
    font-size: 17px;
    color: #434343;
  }

  .w-textsm {
    font-size: 13px;
    color: #959595;
    margin-top: 10px;
  }
</style>
